package movee.jpa.multi.source.dao.primary;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.SuperBuilder;

import javax.persistence.Column;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.MappedSuperclass;
import java.io.Serializable;
import java.sql.Timestamp;

/**
 *
 *
 * @author movee
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@SuperBuilder
@MappedSuperclass
public class BaseOperationSheet implements Serializable {

    /**
     * 网络操作单id，自增ID
     */
    @Id
    @Column(name = "id")
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private Long id;

    /**
     * 操作单是否绑定NSC，0：否；1：是
     */
    @Column(name = "nsc_binding")
    private Boolean nscBinding;

    /**
     * 关联的NSC工单id
     */
    @Column(name = "nsc_id")
    private Long nscId;

    /**
     * 操作单标题
     */
    @Column(name = "title")
    private String title;

    /**
     * 操作人
     */
    @Column(name = "operator")
    private String operator;

    /**
     * 计划开始操作时间
     */
    @Column(name = "plan_start_time")
    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Timestamp planStartTime;

    /**
     * 计划结束操作时间
     */
    @Column(name = "plan_end_time")
    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Timestamp planEndTime;


}

